import server from "../util/request.js";


export function findEquipment(params) {
    return server({
        url: '/equip/findAll',
        method: 'GET',
        params
    })
}

// 2 条件查询（分页）
export function listEquipment(params) {
    return server({
        url: '/equip/find',
        method: 'GET',
        params
    })
}

// 3 新增
export function addEquipment(data) {
    return server({
        url: '/equip/insert',
        method: 'POST',
        data
    })
}

// 4 修改
export function updateEquipment(data) {
    return server({
        url: '/equip/update',
        method: 'POST',
        data
    })
}

// 5 删除
export function delEquipment(id) {
    return server({
        url: '/equip/del',
        method: 'POST',
        params: { id }
    })
}
export function roomList() {
    return server({
        url: '/medicalRoom',
        method: 'GET'
    })
}

// 7 确认维护（使用您现有的/equip/confirm接口）
export function confirmMaintenance(id) {
    return server({
        url: '/equip/confirm',
        method: 'POST',
        params: { id }
    })
}